<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="net.skyedu.bean.*" %>
<%@ page import="net.skyedu.dao.*" %>
<%@ page import="java.net.URLDecoder" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>申诉表单</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css"/>
	<link rel="stylesheet" type="text/css" href="css/main.css"/>
	<script language="JavaScript" type="text/javascript" src="../js/lhgdialog/jquery-1.7.2.min.js"></script>
	<script language="JavaScript" type="text/javascript" src="../js/lhgdialog/lhgdialog.min.js?skin=discuz"></script>
	<script language="JavaScript" type="text/javascript" src="../js/ajax.js"></script>
  </head>
  
<body>
<br/>
		<% 
		  	String userID = request.getParameter("userId");
			String attID = request.getParameter("attId");
			int userId = Integer.parseInt(userID);
			int attId = Integer.parseInt(attID);
			AppDao ad = new AppDao();
			Uinfo uf = ad.findUName(userId);
			
			int num = ad.findUN(userId,"MAX(per_status)");
			List<Shensu> seli = null;
			//if(num!=0){  //如果表里有自己，就让他查3-1
			//	if(num==3){  //表里有自己并且是第3级，就向2级申诉
			//		seli = ad.selDx(uf.getSchType(), 2);
			//	}else{  //如果是1、2级就向1级申诉
			//		seli = ad.selDx(0, 1);
			//	}
			//}else{    //如果表里无自己，就让他查3
				//seli = ad.selDx(uf.getSchType(), 3);
		//	}
			seli = ad.selDx();
			pageContext.setAttribute("seli", seli);
			pageContext.setAttribute("uf", uf);
			pageContext.setAttribute("userId", userId);
			pageContext.setAttribute("attId", attID);
	    %>
<!-- 正文内容 -->
<div>
        <dl>
          <dd>
            <table class="addtbale">
            <input type="hidden" name="uName" id="uName" value="${uf.userName }"/>
            <input type="hidden" name="attId" id="attId" value="${attId }"/>
              <tr class="sp_form">
                <td colspan="2"><label for="">申诉人：</label><em id="classtime">${uf.userName }</em></td>
              </tr>
              <tr class="sp_form">
              <script>
              function checkselect()
              {
            	  
            	  if(document.getElementById('appObject').value=="0")
   				 {
    				document.getElementById('appObject').selectedIndex=0;
    				$.dialog.tips('请选择申诉对象！',1,'confirm.gif');
    			}
              }
              
              </script>
               <td colspan="2"><label for="">申诉对象：</label>
                   <select name="appObject" id="appObject" style="width: 150px;" onchange="checkselect();">
  
	          		<c:forEach items="${seli }" var="seli" >
			            <option value="${seli.oaId }" >${seli.uName }</option>
	          		</c:forEach>
		      	   </select>&nbsp;&nbsp;<font color="red">*请选择自己的申诉对象</font>
               </td>
              </tr>
              
              <tr class="sp_form">
                <td  colspan="2"><label for="">申诉理由：</label><textarea name="area" id="area" rows="6" cols="60"></textarea></td>   
              </tr>
            </table>
          </dd>
          <dd class="subbtn">
            <div class="confirmbtn" onclick="SubClick();">提 交</div>
            <div class="cancelbtn" onclick="clears();">清 空</div>
          </dd>
          <br/>
          <dd>
          	<div align="center"><span id="mmsg"></span></div>
          </dd>
        </dl>
 </div>
 <br/>
 <div> <dl>
          <dd>
          	<table class="addtbale">
          		<tr>
          			<td><font color="red">提示：若申诉对象有误，请联系信息部！</font></td>
          		</tr>
          	</table>
          </dd>
       </dl>
 </div>
</body>
</html>
